﻿(function(){function f(){this.marked=[]}function g(a){for(var a=a._matchHighlightState||(a._matchHighlightState=new f),b=0;b<a.marked.length;++b)a.marked[b].clear();a.marked=[]}function e(a,b,d){g(a);d="undefined"!==typeof d?d:h;if(a.somethingSelected()&&a.getSelection().replace(/^\s+|\s+$/g,"").length>=d){var e=a._matchHighlightState||(a._matchHighlightState=new f),i=a.getSelection();a.operation(function(){if(2E3>a.lineCount())for(var c=a.getSearchCursor(i);c.findNext();)(c.from().line!==a.getCursor(!0).line||
c.from().ch!==a.getCursor(!0).ch)&&e.marked.push(a.markText(c.from(),c.to(),{className:b}))})}}var h=2;CodeMirror.defineExtension("matchHighlight",function(a,b){e(this,a,b)})})();